package com.zxy.log4jdemo;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

import com.zxy.log4jdemo.controller.LoginController;

/**
 * Created by zxybird on 16/9/20.
 */
public class App {
  public void printLog() {
    Logger log = Logger.getLogger(App.class.getClass());
    log.info("测试info");
    log.debug("测试debug");
    log.error("测试error");
  }

  public static void main(String[] args) {

    // DOMConfigurator.configure("log4j.xml");
    String url = Thread.currentThread().getContextClassLoader().getResource("").getPath();
    PropertyConfigurator.configure(url + "log4j.properties");

    LoginController loginController = new LoginController();
    loginController.isExsist();

    // Test test = new Test();
    // test.printLog();
  }
}
